<?php require_once("../includes/secure.php"); ?>
<script type="text/javascript">
$(document).ready(function() {
var filename = window.location.href.substr(window.location.href.lastIndexOf("/")+1);
filename = filename.substr(0, filename.length-4); 
  console.log(filename);
//	$("#menu-item-205").addClass("menu-item-105");
  $("li").removeClass("current-menu-item");
  $("#"+ filename).addClass("current-menu-item");
 // alert( $("#"+filename	).html());

});	
</script>

<?php

if (isset($_POST['admin']) && isset($_POST['psw'])  )
{
    	if ($_POST['admin']=="admin" && $_POST['psw']=="1234") 
        {
                $_SESSION['admin']="admin";
               
              
	?>
        <script type="text/javascript">
        self.location="adminAgent.php";

        </script>
        <?php	
        }
}
else if (isset($_POST['logout'])) 
{
	if (isset($_SESSION['admin']))
	{
	unset($_SESSION['admin']);
	}	 
}
?>
<header >
<div class="container_12 clearfix">

    <div id="logo" class="logo" dir="rtl" align="right">
     <a  title="Best Business Solutions" class="site-name">
   ר.א צ'ק אין בע"מ		</a>
    <p class="tagline">ר.א צ'ק אין - פתרונות ביטוח</p>
    <p class="tagline">טלפון: <strong class="color-1">04-8251101</strong> פקס: <strong class="color-1">076-5100392</strong></p> 
    </div>
         <?php if (isset($_SESSION['admin'])) {?>                                                        
    <nav class="primary">
        <ul id="topnav" class="sf-menu">
           <li id="contact" class="menu-item menu-item-type-post_type menu-item-object-page  page_item page-item-203 current_page_item menu-item-205">
           <a onclick='$("#logoutForm").submit();' ><strong><em>התנתקות מהמערכת</em></strong></a></li>
          
           <li id="adminChecks" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-105">
           <a href="adminChecks.php"><strong><em>ניהול צ'קים</em></strong></a></li>
           
           <li id="adminMehiron" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-105">
           <a href="adminMehiron.php"><strong><em>מחירונים</em></strong></a></li>
         
           <li id="adminManuim" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-105">
           <a href="adminManuim.php"><strong><em>ניהול מנויים</em></strong></a></li>

           <li id="adminClient" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-105">
           <a href="adminClient.php"  ><strong><em>ניהול לקוחות</em></strong></a></li>

           <li id="adminAgent" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-17 current-menu-item">
           <a href="adminAgent.php"><strong><em>ניהול סוכנים</em></strong></a></li>
        </ul>
    </nav>
       <?php } ?>
</div><!--.container_12-->
</header>
<form id="logoutForm"  action="adminLogin.php" method="post" >
<input name="logout" value=""  size="40" type="hidden">
</form>	